﻿using com.guojin.core.io.message;
using com.guojin.mj.net.message.login;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class WarDetailsPage : EventManager
{
    private static WarDetailsPage instance;
    public static WarDetailsPage GetInstance()
    {
        return instance;
    }
    void Awake()
    {
        instance = this;
    }

    public GameObject content;
    public Button closeBtn;

    public override void InformationSetting()
    {
        AddListenerToButton(closeBtn, CloseBtnClick);
    }

    public void OnReceive723(string msg, Message data)
    {
        WarDetailsListRet acList = (WarDetailsListRet)data;

        for (int i = 0; i < acList.List.Count; i++)
        {
            GameObject obj = TooL.LoadPrefab(content, "WarDetailsItem");
            obj.GetComponent<WarDetailsItemPage>().InitMsg(acList.List[i]);
        }
    }
}
